PROCESS DEDICATED IN-MEMORY TRANSLATION LOOKASIDE BUFFERS (TLBs) (mTLBs) FOR AUGMENTING MEMORY MANAGEMENT UNIT (MMU) TLB FOR TRANSLATING VIRTUAL ADDRESSES (VAs) TO PHYSICAL ADDRESSES (PAs) IN A PROCESSOR-BASED SYSTEM

ABSTRACT

Process dedicated in-memory translation lookaside buffers (TLBs) (mTLBs) for augmenting a memory management unit (MMU) TLB for translating virtual addresses (VAs) to physical addresses (PA) in a processor-based system is disclosed. In disclosed examples, a dedicated in-memory TLB is supported in system memory for each process so that one process&#39;s cached page table entries do not displace another process&#39;s cached page table entries. When a process is scheduled to execute in a central processing unit (CPU), the in-memory TLB address stored for such process can be used by page table walker circuit in the CPU MMU to access the dedicated in-memory TLB for executing the process to perform VA to PA translations in the event of a TLB miss to the MMU TLB. If a TLB miss occurs to the in-memory TLB, the page table walker circuit can walk the page table in the MMU.

FIELD OF THE DISCLOSURE

The technology of the disclosure relates to processor-based systemsemploying a central processing unit (CPU), also known as a “processor,”and more particularly to a memory management unit (MMU) in a processorthat includes a translation lookaside buffer (TLB) and page tablesaccessed to provide virtual address (VA) to physical address (PA)translations.

BACKGROUND

Microprocessors, also known as “processors,” perform computational tasksfor a wide variety of applications. A conventional microprocessorincludes one or more central processing units (CPUs) also known asprocessor cores. The processor is realized in a processor-based systemthat includes a memory system that is accessed to retrieve computerinstructions that are executed by the processor to perform tasks. Thememory system is also accessed to retrieve data that is used forexecution of computer instructions. Results of the executed computerinstructions can be stored as data in the memory system. The memorysystem includes a primary or system memory that is located on-chip oroff-chip with the processor and is configured to retrieve and store dataassociated with a physical memory address also known as a physicaladdress (PA) provided by the processor. The memory system may alsoinclude a cache memory system that includes one or more levels of cachememory that is faster memory than the system memory and is configured tostore data for a subset of the PAs for data that is more often accessedby the processor for improved memory access performance.

Operating systems that execute processes on a processor may beconfigured to use virtual memory as a virtual memory system. In virtualmemory systems, each process is given the impression that a largernumber of memory addresses are available for retrieving and storing datathan PAs in the memory system. For example, each CPU in a processor mayhave larger VA space of 0x00000000-0x7FFFFFFF that must be mapped to asmaller PA space of 0x00000000-0x00FFFFFF in the memory system for agiven process. When a process requests access to data in memory, theprocess provides a memory address that is a virtual address (VA) basedon the larger PA space. The VA must be mapped to an actual PA in thememory system where the data is to be stored or retrieved. In thisregard, each CPU in a processor may contain a memory management unit(MMU) that is employed to translate VAs to PAs. Most processorarchitectures support an in-memory table called a “page table” to mapVAs to PAs. A page table is the data structure that contains one pagetable entry (PTE) per memory page to map a VA to a PA. Most page tableshave multiple levels that depend upon the base page size, the number ofpage table entries at each level, and the number of bits of VA spacesupported. FIG. 1 illustrates an example of a multiple level page table100 that includes three (3) levels of level page tables 102(2)-102(0)that is configured to be accessed to convert a VA 104 to a PA. The levelpage tables 102(2)-102(0) are organized to provide for a base page sizeof 4 Kilobytes (KB) where the number of PTEs at each page table level is512 (i.e., addressable by 9 bits) with a 39 bit VA space supported. Thetop level (level 2) page table 102(2) is at level 2 and is indexed by alevel 2 index in bits 38-30 of the VA 104. The page table entries (entry0-entry 511) of the level 2 page table 102(2) point to one of an ‘X’number of level 1 page tables 102(1)(0)-102(1)(X), which is then indexedby a level 1 index in bits 29-21 of the VA 104. The page table entriesin the level 1 page table 102(1) points to one of ‘Y’ number of level 0page tables 102(0)(0)-102(0)(Y), which is then indexed by a level 0index in bits 20-12 of the VA 104. In this example, page table entriesaccessed across the level page tables 102(2)-102(0) in the page table100 identify a PA of a 4 KB page in physical memory. The offset bits ofPA for the VA 104 is the offset in the VA 104 in bits 11-0 in thisexample.

MMUs typically provide a hardware page table walker architecture totranslate a VA to a PA. For a given VA, the page table walker walks thepage table from the top and descends down the page table levels until itfinds the leaf PTE that contains the PA for the VA. The page table walkinvolves memory references at each level of page table which can be timeconsuming. To address this page table walk inefficiency, MMUs typicallyinclude a high-speed cache memory called a translation lookaside buffer(TLB) to cache the most recent VA to PA translations. In response to amemory address request where a VA to PA translation is required, the MMUfirst accesses in the TLB based on the VA of memory access request. Ifthe VA to PA translation is not present in the TLB, a TLB miss occursand the MMU walks the page table until it finds the VA to PA translationwhich is also then loaded in the TLB for future accesses. If the VA toPA translation is present in the TLB, this is a TLB hit, and a pagetable walk of the page table is avoided. So, the hit rate to the TLB isa critical part of the memory access performance of a memory system inprocessor-based system.

When a workload is executed on a CPU, multiple processes and theoperating system kernel compete for entries of the TLB in the MMU. ALeast Recently Used (LRU) algorithm may be used by the MMU to evictolder entries in the TLB as new entries are inserted in the TLB as aresult of TLB misses and page table walks. As the stress of the workloadon memory increases, the TLB can start to thrash, meaning TLB misses andresulting evictions and insertions occur frequently which degradesperformance. At the MMU hardware level, there are two ways to addressthis issue. One solution is to increase the size of the TLB to make theTLB misses occur less frequently. A second solution is to provide acache of intermediate page table pointers in the MMU. In this scenario,when a TLB miss occurs, the page table walker looks in this cache ofintermediate page table pointers for a matching intermediate page table.On a cache hit, the page table walker starts the page table walk fromthe matching intermediate page table instead of from the top level pagetable to shorten the time to walk the page table. However, cost andcomplexity of the MMU hardware is increased by each of these solutions.Also, these solutions may only ultimately delay eventual TLB thrashing.This problem is also further exacerbated in virtual environments. When aguest virtual machine runs on a host computer, the guest virtual machinehas its own page table that is used to translate guest VAs to guest PAs.The host computer also has its own page table that is used to translateguest PAs to host PAs. Since memory can only be accessed by a CPU usinga host PA, every guest PA has to be translated by the CPU to its hostPA. When a page table walker walks the guest page table, it needs totranslate a guest PA to a host PA at every level of the guest page tablein order to access the guest intermediate page table at that level. Thetranslation overhead may be even greater for guests running on a nestedhypervisor.

SUMMARY

Aspects disclosed herein include process dedicated in-memory translationlookaside buffers (TLBs) (mTLBs) for augmenting a memory management unit(MMU) TLB for translating virtual addresses (VAs) to physical addresses(PA) in a processor-based system. The processor-based system includes aprocessor that has one or more central processing units (CPUs) eachconfigured to execute computer software instructions for processes. Theprocessor-based system also includes a memory system that includes amain physical memory that is addressable by a PA. The processor is avirtual memory system that employs virtual addressing to make availablememory to a memory space greater than the number of physical memoryspace in the main system memory of the processor-based system. Incertain examples, either a shared or dedicated MMU for each CPU isprovided for converting VAs to PAs. The MMUs are associated with a TLB(the “MMU TLB”) and a page table (which is a memory circuit) in a systemmemory. The system memory is a memory that is fully addressable by thePA space of the processor-based system. The MMU TLB is a cache memoryassociated with a MMU and is configured to cache page table entries inthe page table to avoid the need to fully walk the page table if a pagetable entry in the page table for the VA to PA translation is containedin the MMU TLB.

In exemplary aspects disclosed herein, to augment an MMU TLB to reduceeither having to walk the page table or perform a full page table walkto translate a VA to a PA, the processor-based system also supports anin-memory TLB allocated in the system memory. In this regard, inresponse to an MMU TLB miss for a VA to a PA translation, an in-memoryTLB is accessed to determine if a page table entry for the VA to PAtranslation is contained in the in-memory TLB. If a page table entry forthe VA to PA translation is contained in the in-memory TLB, the pagetable entry in the in-memory TLB is used to perform the VA to PAtranslation. In this manner, additional page table entries can be cachedfor VA to PA translation without having to expand the size of an MMUTLB. The in-memory TLB can be sized to provide a higher hit rate ifdesired. If a page table entry for the VA to PA translation is notcontained in the in-memory TLB, the MMU walks its page table to performthe VA to PA translation.

In examples disclosed herein, a, dedicated in-memory TLB is supported insystem memory for each process in the processor and which are not sharedacross processes, so that one process's cached page table entries do notdisplace another process's cached page table entries. In this regard,each CPU in the processor supports storing of pointer addresses to thein-memory TLBs in system memory so that the MMUs in the CPUs can accessthe dedicated in-memory TLB corresponding to a particular process. Adedicated in-memory TLB may also be supported for an operating systemkernel and/or a hypervisor that supervises virtualization of guestprocesses executing on a host CPU in examples disclosed herein. When aprocess is scheduled to execute in a CPU, the in-memory TLB addressstored for such process can be loaded into loaded into a designatedregister in the CPU. This allows the page table walker circuit of theMMU to access the dedicated in-memory TLB for the executing process forperforming VA to PA translations in the event of a TLB miss to the MMUTLB. If a TLB miss occurs to the in-memory TLB for an executing process,the page table walker circuit of the MMU can walk the page table.Supporting dedicated in-memory TLBs per process also allows allocationof different sized in-memory TLBs for different processes, if desired,to have different sized in-memory TLBs, which may be based on theirmemory access patterns and the number of process threads sharing anin-memory TLB as examples. In another example, the in-memory TLBs beingin system memory is direct memory-mapped to memory addresses, which canalso simplify the cached page table entry replacement policy.

In other examples, the in-memory TLBs can be configured to cachedifferent levels of page table entries in a page table into an MMU TLB.In another example, the in-memory TLBs can be configured to cache onlycertain levels of level page tables in a page table into an MMU TLB. Forexample, in-memory TLBs associated with a given MMU can be configured tocache page table entries from a higher level page table than the pagetable entries cached in the MMU TLB for enhanced performance. Thus, if aTLB hit occurs on any cached non-leaf page table entries in the MMU TLB,only a lower level page table will need to be walked by the page tablewalker circuit to translate a VA to a PA. If a TLB miss occurs in theMMU TLB, the page table walker circuit can consult the in-memory TLB fora matching page table entry to translate the VA to a PA.

In this regard, in one exemplary aspect, a memory management system in aCPU in a processor of a processor-based system is provided. The memorymanagement system comprises a page table in a system memory of theprocessor-based system, the page table comprising at least one levelpage table each comprising a plurality of page table entries eachaddressable by a VA and configured to store a PA associated with the VA,an MMU TLB comprising a plurality of MMU TLB entries each configured tostore a cached page table entry in the page table, an in-memory TLB inthe system memory, the in-memory TLB comprising a plurality of in-memoryTLB entries each configured to store a cached page table entry in thepage table, a page table walker circuit configured to access theplurality of page table entries in the at least one level page table inthe page table based on the VA, and an MMU circuit. The MMU circuit isconfigured to receive a memory access request comprising a VA based on acomputer software instruction executed for a process in the CPU anddetermine if an MMU TLB entry in the MMU TLB contains a page table entrycomprising a PA corresponding to the VA. In response to determining theMMU TLB does not contain an MMU TLB entry containing a page table entrydirectly corresponding to the VA, the MMU circuit is also configured todetermine if a VA stored in an in-memory TLB entry corresponding to theVA in an in-memory TLB allocated to the process in the system memory inthe processor-based system matches the VA of the memory access request,and in response to determining the VA stored in the in-memory TLB entrymatches the VA of the memory access request, translate the VA to a PAbased the accessed page table entry in the in-memory TLB entrycorresponding to the VA.

In another exemplary aspect, a method of translating a VA to a PA in aCPU in a processor of a processor-based system is provided. The methodcomprises receiving a memory access request comprising a VA based on acomputer software instruction executed for a process in the CPU anddetermining if an MMU translation lookaside buffer (TLB) entry in an MMUTLB comprising a plurality of MMU TLB entries each configured to store acached page table entry in a page table contains a page table entrycomprising a PA corresponding to the VA. The page table entry iscontained in the page table comprising at least one level page tableeach comprising a plurality of page table entries each addressable by aVA and configured to store a PA associated with the VA. In response todetermining the MMU TLB does not contain an MMU TLB entry containing apage table entry corresponding to the VA, the method further comprisesdetermining if a VA stored in an in-memory TLB entry corresponding tothe VA in an in-memory TLB in the system memory of the processor-basedsystem that is allocated to the process in a system memory in theprocessor-based system matches the VA of the memory access request. Inresponse to determining the VA stored in the in-memory TLB entry matchesthe VA of the memory access request, the method also comprisestranslating the VA to a PA based the accessed page table entry in thein-memory TLB entry corresponding to the VA.

In another exemplary aspect, processor-based system is provided. Theprocessor-based system comprises a system memory and a processorcomprising one or more CPUs each configured to execute computerinstructions in an operating system software program and one or moreprocesses. Each CPU among the one or more CPUs comprises a memorymanagement system, comprising a page table in the system memory, thepage table comprising a plurality of level page tables each comprising aplurality of page table entries each addressable by a VA and configuredto store a PA associated with the VA, an MMU TLB comprising a pluralityof MMU TLB entries each configured to store a cached page table entry inthe page table, an in-memory TLB in the system memory, the in-memory TLBcomprising a plurality of in-memory TLB entries each configured to storea cached page table entry in the page table, a page table walker circuitconfigured to access a page table entry in at least one level page tablein the page table based on the VA, and an MMU circuit. The MMU circuitis configured to receive a memory access request comprising a VA basedon a computer software instruction executed for a process among the oneor more processes in a CPU among the one or more CPUs and determine ifan MMU TLB entry in the MMU TLB contains a page table entry comprising aPA corresponding to the VA. In response to determining the MMU TLB doesnot contain an MMU TLB entry containing a page table entry correspondingto the VA, the MMU circuit is also configured to determine if a VAstored in an in-memory TLB entry corresponding to the VA in an in-memoryTLB allocated to the process in the system memory in the processor-basedsystem matches the VA of the memory access request. In response todetermining the VA stored in the in-memory TLB entry matches the VA ofthe memory access request, the MMU circuit is also configured totranslate the VA to a PA based the accessed page table entry in thein-memory TLB entry corresponding to the VA.

Those skilled in the art will appreciate the scope of the presentdisclosure and realize additional aspects thereof after reading thefollowing detailed description of the preferred embodiments inassociation with the accompanying drawing figures.

BRIEF DESCRIPTION OF THE DRAWING FIGURES

The accompanying drawing figures incorporated in and forming a part ofthis specification illustrate several aspects of the disclosure, andtogether with the description serve to explain the principles of thedisclosure.

FIG. 1 is an example of a multiple level page table included in a memorymanagement unit (MMU) of a processor for translating a virtual address(VA) to a physical address (PA) in memory;

FIG. 2 is a diagram of an exemplary processor-based system that includesa processor with multiple central processing units (CPUs) eachconfigured to process instructions fetched from memory that includeinstructions to fetch data from memory and store data to memory;

FIG. 3 is a schematic diagram of an exemplary memory management systemthat includes at least one MMU provided in a CPU and a system memorythat includes a page table and an MMU translation lookaside buffer (TLB)for translating VA to PAs, and wherein the memory management system isfurther configured to include process dedicated in-memory TLBs in thesystem memory that is configured to store cached page table entries inthe page table for translating a VA to PA in the event of a miss to theMMU TLB;

FIG. 4A illustrates an exemplary bit format of an exemplary VA that maybe used by a CPU in the processor in FIG. 2 to address the memorysystem;

FIG. 4B illustrates an exemplary page table that can be provided in anMMU in FIG. 3, wherein the page table includes a plurality of level pagetables each containing page table entries addressable by a VA;

FIG. 5A illustrates an exemplary in-memory TLB register that contains amemory address field configured to store a memory address pointing to anin-memory TLB in system memory;

FIG. 5B illustrates and exemplary in-memory TLB entry in an in-memoryTLB in system memory;

FIG. 6 is a flowchart illustrating an exemplary process of an MMU in thememory management system in the processor in FIG. 3 translating a VA toa PA and accessing a process dedicated in-memory TLB in the systemmemory to translate a VA to a PA for a process;

FIGS. 7A and 7B are schematic diagrams of other multiple level pagetables that contain leaf page table entries and can be included in asystem memory in the memory management system in FIG. 3 for translatinga VA to a PA;

FIG. 8 is a schematic diagram of an exemplary in-memory TLB that cachesentries from multiple level page tables;

FIG. 9 is a block diagram of an exemplary processor-based system thatincludes a processor with one or more CPUs and includes a memorymanagement system that includes at least one MMU provided in a CPU and amemory management system that includes a page table and an MMU TLB fortranslating VAs to PAs, and wherein the memory management system isfurther configured to include process dedicated in-memory TLBs in thesystem memory configured to store cached page table entries in the pagetable for translating a VA to a PA in the event of a miss to the MMUTLB, including but not limited to the processor in FIG. 2 and the memorymanagement system in FIG. 3.

DETAILED DESCRIPTION

Aspects disclosed herein include process dedicated in-memory translationlookaside buffers (TLBs) (mTLBs) for augmenting a memory management unit(MMU) TLB for translating virtual addresses (VAs) to physical addresses(PA) in a processor-based system. The processor-based system includes aprocessor that has one or more central processing units (CPUs) eachconfigured to execute computer software instructions for processes. Theprocessor-based system also includes a memory system that includes amain physical memory that is addressable by a PA. The processor is avirtual memory system that employs virtual addressing to make availablememory to a memory space greater than the number of physical memoryspace in the main system memory of the processor-based system. Incertain examples, either a shared or dedicated MMU for each CPU isprovided for converting VAs to PAs. The MMUs are associated with a TLB(the “MMU TLB”) and a page table (which is a memory circuit) in a systemmemory. The system memory is a memory that is fully addressable by thePA space of the processor-based system. The MMU TLB is a cache memoryassociated with a MMU and is configured to cache page table entries inthe page table to avoid the need to fully walk the page table if a pagetable entry in the page table for the VA to PA translation is containedin the MMU TLB.

In exemplary aspects disclosed herein, to augment an MMU TLB to reduceeither having to walk the page table or perform a full page table walkto translate a VA to a PA, the processor-based system also supports anin-memory TLB allocated in the system memory. In this regard, inresponse to an MMU TLB miss for a VA to a PA translation, an in-memoryTLB is accessed to determine if a page table entry for the VA to PAtranslation is contained in the in-memory TLB. If a page table entry forthe VA to PA translation is contained in the in-memory TLB, the pagetable entry in the in-memory TLB is used to perform the VA to PAtranslation. In this manner, additional page table entries can be cachedfor VA to PA translation without having to expand the size of an MMUTLB. The in-memory TLB can be sized to provide a higher hit rate ifdesired. If a page table entry for the VA to PA translation is notcontained in the in-memory TLB, the MMU walks its page table to performthe VA to PA translation.

In examples disclosed herein, a, dedicated in-memory TLB is supported insystem memory for each process in the processor and which are not sharedacross processes, so that one process's cached page table entries do notdisplace another process's cached page table entries. In this regard,each CPU in the processor supports storing of pointer addresses to thein-memory TLBs in system memory so that the MMUs in the CPUs can accessthe dedicated in-memory TLB corresponding to a particular process. Adedicated in-memory TLB may also be supported for an operating systemkernel and/or a hypervisor that supervises virtualization of guestprocesses executing on a host CPU in examples disclosed herein. When aprocess is scheduled to execute in a CPU, the in-memory TLB addressstored for such process can be loaded into an in-memory TLB register inthe CPU. This allows the page table walker circuit of the MMU to accessthe dedicated in-memory TLB for the executing process for performing VAto PA translations in the event of a TLB miss to the MMU TLB. If a TLBmiss occurs to the in-memory TLB for an executing process, the pagetable walker circuit of the MMU can walk the page table. Supportingdedicated in-memory TLBs per process also allows allocation of differentsized in-memory TLBs for different processes, if desired, to havedifferent sized in-memory TLBs, which may be based on their memoryaccess patterns and the number of process threads sharing an in-memoryTLB as examples. In another example, the in-memory TLBs being in systemmemory is direct memory-mapped to memory addresses, which can alsosimplify the cached page table entry replacement policy.

In other examples, the in-memory TLBs can be configured to cachedifferent levels of page table entries in a page table into an MMU TLB.In another example, the in-memory TLBs can be configured to cache onlycertain levels of level page tables in a page table into an MMU TLB. Forexample, in-memory TLBs associated with a given MMU can be configured tocache page table entries from a higher level page table than the pagetable entries cached in the MMU TLB for enhanced performance. Thus, if aTLB hit occurs on any cached non-leaf page table entries in the MMU TLB,only a lower level page table will need to be walked by the page tablewalker circuit to translate a VA to a PA. If a TLB miss occurs in theMMU TLB, the page table walker circuit can consult the in-memory TLB fora matching page table entry to translate the VA to a PA.

Before discussing examples of process dedicated mTLBs for augmenting anMMU TLB for translating VAs to PAs in a processor-based system, anexemplary processor-based system that includes a processor with one ormore CPUs is first discussed with regard to FIG. 2.

In this regard, FIG. 2 is a diagram of an exemplary processor-basedsystem 200 that includes a processor 202 configured to issue memoryrequests (i.e., data read and data write requests) to a memory system204 that includes a cache memory system 206 and a system memory 208. Thesystem memory 208 is a memory that is fully addressable by the PA spaceof the processor-based system 200. For example, the system memory 208may be a dynamic random access memory (DRAM) provided in a separate DRAMchip. The processor 202 includes one or more respective CPUs210(0)-210(N), wherein ‘N’ is a positive whole number representing thenumber of CPUs included in the processor 202. The processor 202 can bepackaged in an integrated circuit (IC) chip 212. The cache memory system206 includes one or more cache memories 214(1)-214(X) that may be atdifferent hierarchies in the processor-based system 200 and that arelogically located between the CPUs 210(0)-210(N) and the system memory208, where ‘X’ is a positive whole number representing the number ofCPUs included in the processor 202. A memory controller 216 controlsaccess to the system memory 208. For example, a CPU 210(0)-210(N) as arequesting device may issue a data request 218 to read data in responseto processing a load instruction. The data request 218 includes a targetaddress of the data to be read from memory. Using CPU 210(0) as anexample, if the requested data is not in a private cache memory 214(1)(i.e., a cache miss to cache memory 214(1)) which may be considered alevel one (L1) cache memory, the private cache memory 214(1) sends thedata request 218 over an interconnect bus 220 in this example to ashared cache memory 214(X) shared with all of the CPUs 210(0)-210(N),which may be a level (3) cache memory. The requested data in the datarequest 218 is eventually either fulfilled in a cache memory214(1)-214(X) or the system memory 208 if not contained in any of thecache memories 214(1)-214(X).

The processor-based system 200 in FIG. 2 is configured to supportvirtual addressing. In this regard, an operating system that executesprocesses on the processor 202 can use virtual memory as a virtualmemory system by issuing VAs in memory access requests. In virtualmemory systems, each process is given the impression that a largernumber of memory addresses (i.e., VAs) are available in the memorysystem 204 for retrieving and storing data than PAs in the system memory208. When a process requests access to data in the memory system 204,the process provides a memory address that is a VA. The VA must then bemapped to an actual PA in the memory system 204 where the data is to bestored or retrieved. In this regard, each CPU 210(0)-210(N) in theprocessor 202 in FIG. 2 may contain or have an associated an MMU222(0)-220(N) that is employed to translate VAs to PAs.

FIG. 3 is a schematic diagram of an exemplary memory management system300 that includes an MMU circuit 302 associated with CPU 210(0)-210(N)in the processor 202 in FIG. 2 that translates a VA to a PA for memoryaccess requests issued by a respective associated CPU 210(0)-210(N). Thememory management system 300 includes a page table 304 and an MMU TLB306 in system memory 208 that are accessed by the MMU circuit 302 forconverting VAs to PAs. The page table 304 is a memory circuit thatincludes a number of page table entries 308(0)-308(E) that are indexablebased on the VA to provide information for translation from the PA to aVA. The page table 304 is accessed or “walked” by a page table walkercircuit 309 in the MMU circuit 302 based on the incoming VA, in responseto a TLB miss and in-memory TLB miss (discussed below), in response to acomputer software instruction executed by a respective CPU 210(0)-210(N)to determining if page table entries 308(0)-308(E) containinginformation to translate the VA to a PA is present. If so, a “page tablehit” 310 is issued by the page table 304, and the MMU circuit 302provides the PA for the memory access request to the MMU TLB 306. Thetranslated PA is also written as a “TLB write” 312 to the MMU TLB 306.If the page table entries 308(0)-308(E) in the page table 304 do notcontain information to translate the VA to a PA, a “page table miss” 314is issued by the page table 304, and a memory management fault and trapoccurs or an exception is communicated to the operating system to beprocessed. The page table 304 may include a number of page table levelsthat have to be “walked” by the page table walker circuit 309 totranslate the incoming VA to a PA.

To increase performance in translating VAs to PAs, a VA translated byaccessing the page table 304 and the PA information resulting from anissued “page table hit” 310 is also cached (i.e., written) in the MMUTLB 306. The MMU TLB 306 is a cache memory that is faster memory thanthe page table 304 in this example. The MMU TLB 306 has a plurality ofMMU TLB entries 318(0)-318(T) that are each configured to store a PAassociated with a given VA. The VA stored in the MMU TLB entries318(0)-318(T) are tags that can be compared against an incoming VA in areceived memory access request before accessing the page table 304 todetermine if any MMU TLB entry 318(0)-318(T) is present in the MMU TLB306 that has the translated PA. If so, a “TLB hit” 320 is issued by theMMU TLB 306 without the page table 304 having to be walked, and the MMUcircuit 302 provides the PA in the hit MMU TLB entry 318(0)-318(T) forthe memory access request. If the incoming VA in a received memoryaccess request is not present in any MMU TLB entry 318(0)-318(T) in theMMU TLB 306, a “TLB miss” 322 is issued, and the VA can be used to walkthe page table 304 to translate the incoming VA to the PA as discussedabove.

When a workload is executed on a CPU 210(0)-210(N) in the processor 202in FIG. 2, multiple processes and the operating system kernel competefor access to the MMU TLB 306. As the stress of the workload on memorysystem 204 increases, the MMU TLB 306 can start to thrash, meaning TLBmisses and resulting evictions and insertions occur frequently, whichdegrades performance. In exemplary aspects disclosed herein, to augmentthe MMU TLB 306 to reduce the number of page table 304 walks totranslate a VA to a PA, the memory management system 300 in FIG. 3 alsosupports in-memory TLBs 324(0)-324(I) allocated in system memory 208. Inresponse to a TLB miss to the MMU TLB 306 for a VA to a PA translation,an in-memory TLB 324(0)-324(I) can be accessed to determine if a pagetable entry in an in-memory TLB entry in the accessed in-memory TLB324(0)-324(I) is present to translate the VA to its PA. Each in-memoryTLB 324(0)-324(I) contains a plurality of in-memory TLB entries326(0)(0)-326(I)(B) that are each configured to cache a page table entry308(0)-308(E) in the page table 304. If a page table entry 308(0)-308(E)for the VA to PA translation is contained in an in-memory TLB entry326(0)(0)-326(I)(B) in the accessed in-memory TLB 324(0)-324(I), suchpage table entry 308(0)-308(E) in the accessed in-memory TLB324(0)-324(I) is used to perform the VA to PA translation. In thismanner, additional page table entries can be cached for VA to PAtranslations without having to expand the size of the MMU TLB 306.System memory 208, which is more abundant and cheaper for a given memorysize, is allocated for the in-memory TLBs 324(0)-324(I). If a page tableentry for the VA to PA translation is not contained in the accessedin-memory TLB 324(0)-324(I), the MMU circuit 302 causes the page tablewalker circuit 309 to walk the page table 304 as previously discussedabove to perform the VA to PA translation.

As will be discussed in more detail below, the memory management system300 in FIG. 3 is configured to support allocation of each in-memory TLB324(0)-324(I) in system memory 208 being dedicated to a specific processexecuted in the CPUs 210(0)-210(N) and thus not shared between differentprocesses. For example, in-memory TLB 324(0) is dedicated for oneprocess executed in the CPUs 210(0)-210(N), whereas in-memory TLB 324(X)is assigned to a different process executing in the CPUs 210(0)-210(N).In this regard, each CPU 210(00-210(N) in the processor 202 in FIG. 2supports storing addresses of the in-memory TLBs 324(0)-324(I) in systemmemory 208 allocated to respective processes so that page table entriescached in in-memory TLB entries 326(0)(0)-326(0)(B) in the in-memory TLB324(0) for example, do not displace page table entries in in-memory TLBentries 326(0)(0)-326(0)(B) in in-memory TLB 324(I). In this manner, thein-memory TLBs 324(0)-324(I) are not shared across processes. Thein-memory TLBs 324(0)-324(I) can be shared across multiple CPUs210(0)-210(N) as multiple CPUs 210(0)-210(N) can execute the sameprocess. A dedicated in-memory TLB may also be supported for anoperating system kernel and/or a hypervisor in the processor 202 thatsupervises virtualization of guest processes executed on a host CPU210(0)-210(N) as examples.

When a process is scheduled to execute in CPU(s) 210(0)-210(N), anin-memory TLB address stored for such process can be loaded into the MMUcircuit 302 associated with the CPU 210(0)-210(N). This allows the MMUcircuit 302 to access the dedicated in-memory TLB 324(0)-324(I) forexecuting the process for performing VA to PA translations in the eventof a TLB miss to the MMU TLB 306 and a TLB hit to the in-memory TLB324(0)-324(I), which may avoid the page table walker circuit 309 havingto walk the page table 304. If a TLB miss occurs to the in-memory TLB324(0)-324(I) for an executed process, the page table walker circuit 309can walk the page table 304 as previously discussed. The memorymanagement system 300 supporting the process dedicated in-memory TLBs324(0)-324(I) can also allow allocation of different sized in-memoryTLBs 324(0)-324(I) for different processes, if desired. It may bedesired to provide different sized in-memory TLBs 324(0)-324(I) based ontheir memory access patterns by respective processes and the number ofprocess threads sharing an in-memory TLB 324(0)-324(I) as examples. Inanother example, the in-memory TLBs 324(0)-324(I) being in system memory208 allows the in-memory TLBs 324(0)-324(I) to be direct memory-mappedto memory addresses, which can also simplify the cached page table entryreplacement policy. The examples discussed below explain in moreexemplary detail operations of an MMU circuit like the MMU circuit 302in FIG. 3 accessing its in-memory TLBs 324(0)-324(I) for a given processbeing executed in the CPUs 210(0)-210(N) to translate VAs to PAs inmemory access requests issued as a result of executing the process.

In this non-limiting example, the bit size of the VA memory addressessupported by the processor-based system 200 in FIG. 2 is 64 bits. Inthis regard, FIG. 4A illustrates an exemplary bit format of an exemplaryVA 400 supported by the processor-based system 200 that shows the bitassignment of bits 63-0. Bits 63-48 are free bits that are unused or canbe reserved for additional functionality. The address space of the VA400 is 48 bits that spans bits 47-0 to support 2⁴⁸ virtual memorylocations in the processor-based system. The bits of the VA 400 can beused to index a page table, which may be employed as the page table 304in the memory management system 300 in FIG. 3. FIG. 4B illustrates anexemplary page table 402 that can be provided in the MMU circuit 302 inFIG. 3, wherein the page table 402 includes four (4) levels of levelpage tables 404(3)-404(0) each containing page table entries addressableby the VA 400. Each page table entry in the level page tables404(3)-404(0) is either a leaf page table entry that is not used tofurther access another page table entry and can be directly associatedwith a memory page in physical memory in the system memory 208, or anon-leaf page table entry that is used to further access another pagetable entry to obtain the PA of a memory page in the system memory 208and can be cached in this example.

With continuing reference to FIG. 4B, the level page tables404(3)-404(0) in the page table 402 are organized to provide for a basepage size of 4 Kilobytes (KB) where the number of page table entries ineach level page table 404(3)-404(0) is 512 (i.e., addressable by 9 bits)with a 39 bit VA 400 address space supported. The level page table404(3) contains page table entries 408(3)(0)-408(3)(511) and designed tonot be cached in the in-memory TLBs 324(0)-324(I) of FIG. 3 in thisexample. The level 2 page table 404(2) is at level 2 in the page table402 and is indexed by a level 2 index 406(2) in bits 38-30 of the VA400. Page table entries (512 or 29 entries) 408(2)(0)-408(2)(511) of thelevel 2 page table 404(2) each point to one of an ‘X’ number of level 1page tables 404(1)(0)-404(1)(X), which is then indexed by a level 1index 406(1) in bits 29-21 of the VA 400. The page table entries (512 or29 entries) 408(1)(0)(0)-408(1)(X)(511) (i.e., level page table at level(1), 0-X number of level 1 page table, and 0-511 entries per level pagetable) in each of the level 1 page tables 404(1)(0)-404(1)(X) points toone of ‘Y’ number of level 0 page tables 404(0)(0)-404(0)(Y), which isthen indexed by a level 0 index 406(0) in bits 20-12 of the VA 400. Inthis example, page table entries 408 accessed across the level pagetables 404(2), 404(1)(0)-404(1)(X), 404(0)(0)-404(0)(Y) in the pagetable 402 identify a 4 KB page PA in the system memory 208 in theprocessor-based system 200 in FIG. 2. The offset bits of PA for the VA104 is the offset in the VA 400, which is in bits 11-0 of the VA 400 inthis example.

As an example, as will be discussed in more detail below, the memorymanagement system 300 in FIG. 3 can be configured to cache differentlevels of level page tables 404(2), 404(1)(0)-404(1)(X),404(0)(0)-404(0)(Y) in different memory structures. For example, thepage table entries 408(2)(0)-408(2)(511) of the level 2 page table404(2) may be cached in the in-memory TLB 324(0)-324(I), whereas thepage table entries 408(1)(0)(0)-408(1)(X)(511) in the level 1 page table404(1)(0)-404(1)(X) may be cached in the MMU TLB 306 in the MMU circuit302 in FIG. 3. The page table entries 408(0)(0)(0)-408(0)(Y)(511) in thelevel 0 page table 404(0)(0)-404(0)(Y) are leaf page table entries thatcan be cached in the MMU TLB 306.

As discussed above, a dedicated in-memory TLB 324(0)-324(I) in thememory management system 300 in FIG. 3 can be provided per processexecuting in the CPUs 210(0)-210(N) in the processor 202 in FIG. 2.Thus, in an example, when a thread of a process is scheduled to executeon a CPU 210(0)-210(N) in the processor 202, a mechanism is provided toindicate the particular in-memory TLB 324(0)-324(I) allocated in systemmemory 208 to the process so that the MMU circuit 302 can know where inthe system memory 208 to access a dedicated in-memory TLB 324(0)-324(I)for the process. In this regard, a CPU 210(0)-210(N) 3 can include anin-memory TLB register that contains a memory address field configuredto store a memory address pointing to a PA in system memory 208 to anin-memory TLB 324(0)-324(I) corresponding to a current process to beexecuted in the CPU 210(0)-210(N). An example of such an in-memory TLBregister 500 is illustrated in FIG. 5A. As shown in FIG. 5A, thein-memory TLB register 500 includes a memory address field 502 that isconfigured to store a physical address pointing to an in-memory TLB324(0)-324(I) corresponding to a current process to be executed in theCPU 210(0)-210(N). For a host that runs directly on a CPU 210(0)-210(N),such as a host hypervisor, the memory address field 502 could be thehost PA. For a guest that runs directly on a CPU 210(0)-210(N), thememory address field 502 could be the guest PA. Also in this example,the in-memory TLB register 500 includes a number of TLB entries field504 that is configured to store the number of in-memory TLB entries326(0)(0)-324(I)(B) in the contained in-memory TLB 324(0)-324(I). Thisis so that the in-memory TLB 324(0)-324(I) will know the size in termsof number of in-memory TLB entries 326(0)(0)-324(I)(B) allocated in thein-memory TLB 324(0)-324(I) identified by the memory address in thememory address field 502. In this example, the in-memory TLB register500 also includes a cache level in page table field 506 that isconfigured to store a number to indicate which levels in the level pagetables 404 of the page table 402 in FIG. 4 to cache in the in-memory TLB324(0)-324(I) identified in the memory address field 502. Also in thisexample, the in-memory TLB register 500 includes a cache level in MMUTLB field 508 that is configured to store a number indicate which levelsin the level page tables 404 of the page table 402 to cache in the MMUTLB 306.

FIG. 5B illustrates an exemplary in-memory TLB entry 326 that representsthe architecture of the in-memory TLB entries 326(0)(0)-326(I)(B) in anin-memory TLB 324(0)-324(I) in FIG. 3 as an example. As shown therein,the in-memory TLB entry 326 includes a leaf or non-leaf page table entrycached field 510 configured to store in the in-memory TLB entry 326either a leaf or non-leaf page table entry. The in-memory TLB entry 326also includes a lock indicator 512 configured to store a lock state asthe in-memory TLB entry 326 being in a locked state or unlocked state.For example, a ‘0’ bit could signify an unlocked state, and a ‘1’ couldsignify a locked state. As discussed below, the lock indicator 512 canbe edited by the MMU circuit 302 to indicate if a given in-memory TLBentry 326 in an in-memory TLB 324(0)-324(I) is being used in case thereare two page table walkers configured to race with each other to accessthe read or write the same in-memory TLB entry 326 in an in-memory TLB324(0)-324(I). The in-memory TLB entry 326 also includes a VA tag field514 configured to store a VA corresponding to the in-memory TLB entry326 that can be used by the MMU circuit 302 to compare against anincoming VA to be translated to a PA to determine if the in-memory TLBentry 326 can be used to translate the VA to its PA. The in-memory TLBentry 326 in this example also includes a generation number field 516configured to store a generation number. As will be discussed in moredetail below, the generation number stored in the generation numberfield 516 can be used to determine if in-memory TLB entry 326 is validand to provide a way to invalidate the in-memory TLB entry 326.

FIG. 6 is a flowchart illustrating an exemplary process 600 of the MMUcircuit 302 in the memory management system 300 in FIG. 3 translating aVA to a PA and accessing a process dedicated in-memory TLB 324(0)-324(I)in the system memory 208 to translate a VA to a PA. The process 600 inFIG. 6 is discussed in conjunction with the memory management system 300in FIG. 3 and the page table 402 in FIG. 4B. In this regard, the MMUcircuit 302 receives a memory access request comprising a VA 400 basedon a computer software instruction executed for a process in the CPU210(0)-210(N) (block 602). The MMU circuit 302 determines if the MMU TLB306 contains an MMU TLB entry 318(0)-318(T) containing the page tableentry corresponding to the VA 400 (block 604). If the MMU TLB 306contains an MMU TLB entry 318(0)-318(T) containing the page table entrycorresponding to the VA 400 (block 604), this is an MMU TLB hit, and theMMU circuit 302 uses the PA stored in the MMU TLB entry 318(0)-318(T)corresponding to the VA 400 to translate the VA 400 into its PA (block606), and the process ends (block 616). If however, the MMU TLB 306 doesnot contain an MMU TLB entry 318(0)-318(T) containing the page tableentry corresponding to the VA 400 (block 604), this is an MMU TLB miss,and the MMU circuit 302 then determines if the VA 400 in the VA tagfield 514 stored in an in-memory TLB entry 326(0)(0))-324(I)(B) in anin-memory TLB 324(0)-324(I) allocated to the process matches the VA 400of the memory access request (block 608). As discussed above, the MMUcircuit 302 can use the memory address stored in the memory addressfield 502 of the in-memory TLB register 500 to access the correspondingin-memory TLB 324(0)-324(I) for the process.

If the VA stored in the VA tag field 514 in an in-memory TLB entry326(0)(0))-326(I)(B) in an in-memory TLB 324(0)-324(I) allocated to theprocess matches the VA 400 of the memory access request, the MMU circuit302 uses contents of the matching in-memory TLB entry326(0)(0))-326(I)(B) (block 608). This is an in-memory TLB hit. If thein-memory TLB entry 326(0)(O)-326(I)(B) contains a leaf page tableentry, the MMU circuit 302 translates the VA 400 to a PA based on theaccessed page table entry in the in-memory TLB entry 326(0)(0)-326(I)(B)having a VA in the VA tag field 514 matching the VA 400 (block 610). Ifthe in-memory TLB entry 326(0)(0))-326(I)(B) contains a non-leaf pagetable entry, the page table walker circuit 309 uses the non-leaf pagetable entry to walk the page table 304. Otherwise, for an in-memory TLBmiss, if the VA stored in the VA tag field 514 in an in-memory TLB entry326(0)(0))-324(I)(B) in an in-memory TLB 324(0)-324(I) allocated to theprocess does not match the VA 400 of the memory access request (block608), this is an in-memory TLB miss, and the MMU circuit 302 conducts apage table walk. The MMU circuit 302 causes the page table walkercircuit 309 to access the level page tables 404(3)-404(0) in the pagetable 402 indexed by the VA 400 of the memory access request (block 612)and translate the VA 400 to the PA contained in a page table entry inthe level page tables 404(3)-404(0) corresponding to the VA 400 (block614), and the process ends (block 616).

As an example, assuming the base page size that can be determined fromthe page table 402 in FIG. 4B is 4 KB, and each intermediate level pagetable 404(3)-404(0) has 512 entries. Also assume that the in-memory TLBregister 500 discussed in FIG. 5A for an in-memory TLB 324(0)-324(I) hasa memory address of its PA in system memory 208 in its memory addressfield 502, 256 TLB entries in the number of TLB entries field 504,levels cached in the in-memory TLB 324(0)-324(I) as level 2 (bitmaprepresented as ‘100’) in the levels cached in the page table levels tocache field 506, and levels cached in the MMU TLB 306 as level 1 (bitmaprepresented as ‘010’) in the levels cached in the page table levels tocache field 508. In this example, a level 0 leaf page table entry408(0)(0)(O)-408(0)(Y)(511) in the level 0 page table404(0)(0)-404(0)(Y) points to a 4 KB memory page. A level 1 leaf pagetable entry 408(1)(0)(0)-408(1)(0)(511) in the level 1 page table404(1)(0)-404(1)(X) points to a 2 MB memory page. A level 2 leaf pagetable entry 408(2)(0)(0)-408(2)(0)(511) in the level 2 page table404(2)(0)-404(2)(511) points to a 1 GigaByte (GB) memory page. A level 1non-leaf page table entry 408(1)(0)(0)-408(1)(0)(511) in the level 1page table 404(1)(0)-404(1)(X) points to a level 0 page table404(0)(0)-404(0)(Y). A level 2 non-leaf page table entry408(2)(0)-408(2)(511) in the level 2 page table 404(2)(0)-404(2)(511)points to a level 1 page table 404(1)(0)-404(1)(X). In this example,leaf page table entries can always be cached in the MMU TLB 306,non-leaf page table entries 408(1)(0)(0)-408(1)(0)(511) can be cached inthe MMU TLB 306, and leaf and non-leaf level 2 page table entries408(2)(0)-408(2)(511) can be cached in an in-memory TLB 324(0)-324(I).

In this example, the span of a single in-memory TLB entry326(0)(0)-326(I)(B) is 1 GB. For a given incoming VA 400 to translateinto a PA, the MMU circuit 302 calculates the index into the in-memoryTLB 324(0)-324(I) for the current process for the VA 400 as follows. Theindex is the (VA/1 GB) % 256. If an in-memory TLB miss occurs (e.g.,block 608 in FIG. 6), the MMU circuit 302 causes the page table walkercircuit 309 to walk the page table 402 from the top level and find theleaf page table entry 408 for the VA 400. The leaf page table entry 408is then written into the MMU TLB 306. If the leaf page table entry 408corresponding to the VA 400 is above the level 2 page table 404(2), nofurther caching is done. If the leaf page table entry 408 correspondingto the VA 400 is at the level 2 page table 404(2), it is cached in thein-memory TLB 324(0)-324(I) and the MMU TLB 306. If the leaf page tableentry 408 corresponding to the VA 400 is at the level 1 or level 0 pagetable 404(1), 404(0), the non-leaf page table entry 408 in the level 2page table 404(2) is cached in the in-memory TLB 324(0)-324(I) and theMMU TLB 306. When the page table entry 408 is cached into the in-memoryTLB 324(0)-324(I) as an in-memory TLB entry 326(0)(0)-326(I)(B), the VAbits of the VA 400 are truncated to a 1 GB boundary to be stored in theVA tag field 514 of the in-memory TLB entry 326(0)(0)-326(I)(B). Acurrent generation number that is discussed in more detail below isstored in the generation number field 516 of the in-memory TLB entry326(0)(0)-326(I)(B). In this manner, it can be precisely controlledwhich page table levels get cached into the MMU TLB 306 and cached inthe in-memory TLB entry 326(0)(0)-326(I)(B) for a current process.

As discussed above, when an MMU TLB hit occurs (e.g., in block 606 inFIG. 6), this means the leaf page table entry 408 for the VA 400 isfound in the MMU TLB 306, and no page table walk into the page table 402is required. If the leaf page table entry 408 has been evicted from theMMU TLB 306, but the level 1 page table entry is still present in theMMU TLB 306, the page table walker circuit 309 can walk the page table402 from the level 1 page table entry 408. If the level 1 page tableentry is not found in the MMU TLB 306, the MMU circuit 302 consults thein-memory TLB 324(0)-324(I) for the current process. If an in-memory TLBhit occurs, the MMU circuit 302 walks from the level 2 page table entrystored in the in-memory TLB 324(0)-324(I).

Additional functionality and variations of the process 600 in FIG. 6 ofan MMU circuit 302 translating a VA 400 to a PA can be performed. Forexample, in response to an MMU TLB miss (e.g., block 604 in FIG. 6), theMMU circuit 302 may be configured to read the VA in the VA tag field 514in the in-memory TLB entry 326(0)(0)-324(I)(B) of the accessed in-memoryTLB 324(0)-324(I). If the lock indicator 512 in the in-memory TLB entry326(0)(0)-324(I)(B) indicates a locked state, this means another processis using the same in-memory TLB entry 326(0)(0)-324(I)(B), and this isconsidered an in-memory TLB miss to perform page table 402 walk (e.g.,blocks 612, 614 in FIG. 6). If however, the lock indicator 512 in thein-memory TLB entry 326(0)(0)-324(I)(B) indicates an unlocked state, theMMU circuit 302 can set the lock indicator 512 to a locked state. Forexample, a compare-and-swap (CAS) instruction can be performed on the VAtag field 514 in the accessed in-memory TLB entry 326(0)(0)-324(I)(B) toset its lock indicator 512 to a locked state. If the CAS instructionfails, this is considered an in-memory TLB miss to perform page table402 walk (e.g., blocks 612, 614 in FIG. 6).

The MMU circuit 302 can then check the VA in the VA tag field 514 of thelocked state accessed in-memory TLB entry 326(0)(0)-324(I)(B) (e.g., inblock 608 in FIG. 6) to determine if the VA in the VA tag field 514matches the VA 400 of the memory access request. If it does not match(e.g., the NO path from block 608 in FIG. 6), this is considered anin-memory TLB miss going to block 612 to perform page table 402 walk(e.g., blocks 612, 614 in FIG. 6). The lock indicator 512 of theaccessed in-memory TLB entry 326(0)(0)-324(I)(B) is set to an unlockedstate. If however, the VA in the VA tag field 514 of the locked stateaccessed in-memory TLB entry 326(0)(0)-324(I)(B) matches the VA 400 ofthe memory access request (e.g., the YES path from block 608 in FIG. 6),the MMU circuit 302 can check the generation number in the generationnumber field 516 in the in-memory TLB entry 326(0)(0)-324(I)(B) todetermine if the generation number is stale. As will be discussed inmore detail below, one way to invalidate a stale in-memory TLB entry326(0)(0)-324(I)(B), such as if a VA-to-PA mapping is changed in theoperating system, is to update the generation number in the generationnumber field 516 of the in-memory TLB entries 326(0)(0)-326(I)(B) to beinvalidated such that their generation numbers are not current. A stalein-memory TLB entry 326(0)(0)-326(I)(B) is treated as an in-memory TLBmiss. However, if both the VA in the VA tag field 514 of the lockedstate accessed in-memory TLB entry 326(0)(0)-326(I)(B) in block 608matches the VA 400 of the memory access request, and the generationnumber in the generation number field 516 of the accessed in-memory TLBentry 326(0)(0)-326(I)(B) is not stale, the in-memory TLB entry326(0)(0)-326(I)(B) can be read and used to translate the VA 400 to a PAfrom the level 2 page table 404(2) which is then used as a starting PAto walk the page table 304 (e.g., block 610 in FIG. 6). The PA is alsowritten back into an MMU TLB entry 318(0)-318(T) in the MMU TLB 306, andthe process ends (e.g., block 616 in FIG. 6).

If an MMU TLB miss and in-memory TLB miss occur (e.g., the NO paths fromblocks 604 and 608 in FIG. 6), the page table walker circuit 309 walksthe page table 402 as previously discussed (e.g., blocks 612, 614 inFIG. 6). If a page table entry 408 found on the page table 402 for theVA 400 does not need to be cached in the in-memory TLB entry326(0)(0)-326(I)(B), the process ends (e.g., block 616 in FIG. 6).Otherwise, the lock indicator 512 in the in-memory TLB entry326(0)(0)-326(I)(B) is set unless already in a locked state. If notalready in a locked state, the VA in the VA tag field 514 of theavailable in-memory TLB entry 326(0)(0)-326(I)(B) is set to the new VAvalue from the instruction being executed that includes a memory accessfound from the walk of the page table 402 and the lock indicator 512 isset to a locked state by performing a CAS instruction on the VA tagfield 514. If the CAS instruction fails, the process ends (e.g., block616 in FIG. 6). Otherwise, the current generation number is written intothe generation number field 516 of the in-memory TLB entry326(0)(0)-326(I)(B) and the page table entry 408 found from the walk ofthe page table 402 is written into the in-memory TLB entry326(0)(0)-326(I)(B). The lock indicator 512 is then reset to an unlockedstate. Memory barriers may be required in these steps to make sure thatupdates are seen in the correct sequence.

If the lock indicator 512 in the in-memory TLB entry 326(0)(0)-326(I)(B)indicates a locked state, this means another process is editing the samein-memory TLB entry 326(0)(0)-326(I)(B), and this is considered anin-memory TLB miss to perform page table 402 walk (e.g., blocks 612, 614in FIG. 6). The process ends (block 616) since at this point, the pagetable walk of the page table 304 has already been completed.

Other organizations of page tables can be employed as the page table 304in the MMU circuit 302 in FIG. 3. For example, FIG. 7A illustratesanother example of a multiple level page table 700 that can be includedas the page table 304 in the MMU circuit 302 in FIG. 3 to translate theVA 400 to point to a 2 MB physical memory page. For example, 3 levels oflevel page tables 702(3)-702(1) are provided. The following cachingscheme can be employed. Page table entries 704(1)(0)-704(1)(511) in thelevel 1 page table 702(1) can be leaf page table entries that always getcached in the MMU TLB 306. The page table entries 704(2)(0)-704(2)(511)in the level 2 page table 702(2) are cached in the in-memory TLB324(0)-324(I). The page table entries 704(3)(0)-704(3)(511) in the level3 page table 702(3) are above the level of the page table entries cachedin the in-memory TLB entries 326(0)(0)-326(I)(B) in the in-memory TLB324(0)-324(I), and thus page table entries 704(3)(0)-704(3)(511) are notcached.

FIG. 7B illustrates another example of a multiple level page table 705that can be included as the page table 304 in the MMU circuit 302 inFIG. 3 to translate the VA 400 to point to a 1 GB physical memory page.For example, two (2) levels of level page tables 706(3)-706(2) areprovided. The following caching scheme can be employed. The leaf pagetable entries 708(2)(0)-708(2)(511) in the level 2 page table 706(2)always get cached in the MMU TLB 306. The leaf page table entries708(2)(0)-708(2)(511) in the level 2 page table 706(2) are cached in thein-memory TLB 324(0)-324(I). The page table entries708(3)(0)-708(3)(511) in the level 3 page table 706(3) are above thelevel of the page table entries cached in the in-memory TLB entries326(0)(0)-326(I)(B) in the in-memory TLB 324(0)-324(I), and thus pagetable entries 708(3)(0)-708(3)(511) are not cached.

If a page table levels to cache field 506 in the in-memory TLB register500 in FIG. 5 specifies that more than one page level should be cachedin the identified in-memory TLB 324(0)-324(I), the in-memory TLB324(0)-324(I) can be split or partitioned into sections in the systemmemory 208 in the processor-based system 200 in FIG. 2 such that the VAsare mapped to the split in-memory TLB entries 326(0)(0)-326(I)(B). Whenan in-memory TLB 324(0)-324(I) is split into multiple levels, the MMUcircuit 302 needs to search in each level of in-memory TLBs324(0)-324(I) starting from the lowest to the highest or in parallel.This is shown by example in FIG. 8. As shown in FIG. 8, a 512 entryin-memory TLB 324 can be split into respective top and bottom in-memoryTLBs 324(T), 324(B) that each have respective 256 in-memory TLB entries326(0)-326(255), 326(256)-326(511). For example, level 1 page tableentries may be cached in the top in-memory TLBs 324(T), and level 2 pagetable entries may be cached in the bottom in-memory TLB 324(B). On anMMU TLB miss to the MMU TLB 306, the MMU circuit 302 would first searchthe in-memory TLB entries 326(0)-326(255) in the top in-memory TLBs324(T) for a matching level 1 page table entry. If that misses, the MMUcircuit 302 would then search the in-memory TLB entries326(256)-326(511) in the bottom in-memory TLBs 324(B) for a matchinglevel 2 page table entry.

It may also be needed or desired to provide a mechanism to invalidatethe MMU TLB entries 318(0)-318(T) in the MMU TLB 306 and the in-memoryTLB entries 326(0)(0)-326(I)(B) in the in-memory TLBs 324(0)-324(I) whenno longer valid so that an incorrect VA to PA translation is notperformed. For example, the VA-to-PA mapping may change when anoperating system kernel executing in a CPU 210(0)-210(N) in theprocessor 202 in FIG. 2 performs an operation that changes the VA-to-PAmapping of a VA to a PA in system memory 208. For example, an operatingsystem kernel may perform functions that change VA-to-PA mapping, suchas unmap operations, remapping operations, permission changes,protection changes, and other miscellaneous changes. In essence, when anattribute of a VA-to-PA mapping changes, it may be necessary toinvalidate the MMU TLB entries 318(0)-318(T) in the MMU TLB 306 and/orthe in-memory TLB entries 326(0)(0)-326(I)(B) in the in-memory TLBs324(0)-324(I). The in-memory TLBs 324(0)-324(I) are an extension of theMMU TLB 306, and as such invalidations of any MMU TLB entries318(0)-318(T) will also need to be performed on in-memory TLB entries326(0)(0)-326(I)(B) in the MMU TLB 306.

For example, the MMU circuit 302 in FIG. 3 may receive an invalidationindicator for an execution process and/or from an operating systemkernel as an example to request an invalidation of TLB entries. This isan internal invalidation request as the invalidation request is beinginitiated from a process and/or operating system kernel with the CPU210(0)-210(N) of the MMU circuit 302. In response to receiving aninvalidation indicator for a process, the MMU circuit 302 can beconfigured to flush one or more in-memory TLB entries326(0)(0)-326(I)(B) in the in-memory TLB 324(0)-324(I) allocated to theprocess based on any VA-to-PA remapping.

As another example, take the situation of process executing on anoperating system kernel in a CPU 210(0)-210(N) in the processor 202 inFIG. 2. The process has an assigned in-memory TLB 324(0)-324(I) aspreviously discussed. A pointer to the memory address of the in-memoryTLB 324(0)-324(I) in system memory 208 is stored in the in-memory TLBregister 500 in FIG. 5A as previously discussed. When a thread of theprocess is context switched onto a CPU 210(0)-210(N), the memory addressof in-memory TLB 324(0)-324(I) in the system memory 208 is loaded intothe in-memory TLB register 500 so that the MMU circuit 302 and its pagetable walker circuit 309 can access the in-memory TLB 324(0)-324(I) forperforming VA-to-PA translations in the event of a TLB miss to the MMUTLB 306. Assume for this example, that the operating system kernelunmaps a range of memory addresses from the memory address spaceaddressed by the process. This means that the page table entries in theunmapped address range that are stored in the in-memory TLB entries326(0)(0)-326(I)(B) in the in-memory TLB 324(0)-324(I) may now beinvalid. Several scenarios may be present. For example, if these pagetable entries affected by the unmapping are cached in the MMU TLBentries 318(0)-318(T) for the process are leaf or non-leaf page tableentries, the MMU TLB entries 318(0)-318(T) in the MMU TLB 306 can beflushed without flushing the in-memory TLB entries 326(0)(0)-326(I)(B)in the in-memory TLB 324(0)-324(I). However, if these page table entryaffected by the unmapping are cached in the in-memory TLB entries326(0)(0)-326(I)(B) for the process, these page tables entries in thein-memory TLB entries 326(0)(0)-326(I)(B) in the in-memory TLB324(0)-324(I) are flushed to be invalidated. Invalidation could involvethe process of simply writing ‘0’s in the page table entry in-memory TLBentries 326(0)(0)-326(I)(B) to be invalidated. In addition, the VA tagfield 514 in an in-memory TLB entry 326(0)(0)-326(I)(B) could be writtenwith 0's as a way to invalidate a page table entry in an in-memory TLBentry 326(0)(0)-326(I)(B). If the unmapped page table entry is at alevel above the level page tables of page table entries cached in thein-memory TLB 324(0)-324(I) for the process, this means there could bepage table entries that are cached from a lower table circuit levels inthe in-memory TLB 324(0)-324(I) that are covered by the affected pagetable entry. In this case, all these page table entries in the in-memoryTLB 324(0)-324(I) are invalidated. As one option, an operating systemkernel could perform the invalidation by writing to the page tableentries in-memory TLB entries 326(0)(0)-326(I)(B) in the in-memory TLB324(0)-324(I) directly without the MMU circuit 302 performing this task.As another option, an operating system kernel could schedule a task forthe MMU circuit 302 to perform the invalidations. The operating systemkernel could invalidate an entire in-memory TLB 324(0)-324(I) for aprocess, for example, by erasing or zeroing out the memory address inthe memory address field in the process structure. The operating systemkernel can then erase or zero out the memory address in the memoryaddress field 502 in the in-memory TLB register 500 in the current CPU210(0)-210(N) running the process. The operating system kernel can issuea cross call command to zero out the in-memory TLB register on otherCPUs 210(0)-210(N) where threads of the same process are running. Thescheduled task could also invalidate an entire in-memory TLB324(0)-324(I) for a process by erasing or zeroing out for example, thememory address in the memory address field 502 in the in-memory TLBregister 500. As for running threads, the operating system kernel couldissue a cross call command to the other CPUs 210(0)-210(N) to causethese other CPUs 210(0)-210(N) to erase the memory address in the memoryaddress field 502 in the in-memory TLB register 500 in each CPU210(0)-210(N) pointing to the in-memory TLB 324(0)-324(I) correspondingto the process that has remapped address space. Once the operatingsystem kernel has taken actions to ensure that the in-memory TLB324(0)-324(I) to be invalidated is not being used, the operating systemkernel can schedule the invalidation in-memory TLB 324(0)-324(I) by abackground task if desired.

As an example, one process that can be performed by an operating systemkernel to internally invalidate an in-memory TLB entries326(0)(0)-326(I)(B) in the in-memory TLB 324(0)-324(I) is as follows. Afirst step could be to invalidate a page table entry in the page table304. A next step could be to invalidate an in-memory TLB entries326(0)(0)-326(I)(B) of an in-memory TLB 324(0)-324(I) to be invalidatedso that the invalidation is globally visible in the processor 202. Thisprevents future walks from loading the page table entry in in-memory TLBentry 326(0)(0)-326(I)(B) that is invalidated from being loaded for use.The VA tag field 514 in the page table entry of the in-memory TLB entry326(0)(0)-326(I)(B) to be invalidated is read and the lock indicator 512read to determine if in-memory TLB entry 326(0)(0)-326(I)(B) is beingaccessed by another MMU or process. Once the lock indicator 512 is in anunlocked state, the lock indicator 512 is set to the locked state usinga CAS instruction. The page table entry in the page table entry cachedfield 510 is invalidated. The VA in the VA tag field 514 can also beinvalidated, such as by storing all 0's in the VA tag field 514. Thelock indicator 512 is then reset to an unlocked state.

It may also be necessary to perform a mechanism to externally invalidatethe MMU TLB entries 318(0)-318(T) in the MMU TLB 306 and the in-memoryTLB entries 326(0)(0)-326(I)(B) in the in-memory TLBs 324(0)-324(I) whenno longer valid so that an incorrect VA-to-PA translation is notperformed. For example, a host hypervisor executing in the processor 202in FIG. 2 may choose to trap guest memory accesses. It can do this byremoving access permissions in the host page table that translates guestprocess PAs to host process PAs. In this situation, all of the guestpage table entries in the MMU TLB entries 318(0)-318(T) in the MMU TLB306 and in-memory TLB entries 326(0)(0)-326(I)(B) in the in-memory TLBs324(0)-324(I) caching page entries for the host page table may need tobe invalidated. However, there could be a number of in-memory TLBs324(0)-324(I) within the guest processes and the guest operating system.An external invalidation mechanism can be performed by use of ageneration number as previous discussed. For example, the hosthypervisor could maintain a set of generation numbers, one for eachguest operating system. As previously discussed, in-memory TLB entries326(0)(0)-326(I)(B) has a generation number field 516. Thus, when theMMU circuit 302 caches a page table entry in an in-memory TLB entry326(0)(0)-326(I)(B) in an in-memory TLBs 324(0)-324(I), a copy of thecurrent guest generation number is stored in the generation number field516 of the cached in-memory TLB entry 326(0)(0)-326(I)(B). Thus, whenthe MMU circuit 302 matches an in-memory TLB entry 326(0)(0)-326(I)(B)in an in-memory TLB 324(0)-324(I) for a given VA 400 to be translated,the generation number stored in the generation number field 516 of thematching in-memory TLB entry 326(0)(0)-326(I)(B) is checked to see if itis current. If not current, the page table entry in the matchingin-memory TLB entry 326(0)(0)-326(I)(B) is not used by the MMU circuit302 effectively meaning it is invalid. When the host hypervisor desiresto invalidate all in-memory TLB entries 326(0)(0)-326(I)(B) in anin-memory TLBs 324(0)-324(I) for a guest operating system, the hosthypervisor can simply increment the generation number stored in thegeneration number field 516 for all the in-memory TLB entries326(0)(0)-326(I)(B) to be invalidated.

It may also be desired to be able to change the size of an in-memoryTLBs 324(0)-324(I) dynamically to improve performance of VA-to-PAtranslation for a particular process. For example, it may be desired toprovide a mechanism to allow an operating system kernel to dynamicallychange the size of an in-memory TLBs 324(0)-324(I) for a process if thememory access requests for the process do not achieve the desired accesstime performance. However, the same in-memory TLBs 324(0)-324(I) may beaccessed by multiple threads of the same process at the same time. Thus,as an example, the operating system kernel may be configured to resizean in-memory TLB 324(0)-324(I) by first invalidating (e.g., zeroing out)the memory address in the memory address field 502 in the process and onthe current CPU 210(0)-210(N) for an in-memory TLBs 324(0)-324(I) to beresized. For running threads, the operating system kernel can beconfigured to send a cross call command to the other CPUs 210(0)-210(N)that would cause the other CPUs 210(0)-210(N) to invalidate the memoryaddress field 502 in an in-memory TLB register 500 in a process for thein-memory TLBs 324(0)-324(I) so that the MMU circuit 302 in the CPUs210(0)-210(N) are effectively prevented from using the in-memory TLBs324(0)-324(I) to be resized for VA-to-PA translations. Now that theoperating system kernel can be sure that the in-memory TLB 324(0)-324(I)for a process to be resized will not be used by a thread of thatprocess, the operating system kernel can allocate a new in-memory TLB324(0)-324(I) for the process in the system memory 208 and initiate thein-memory TLB entries 326(0)(0)-324(I)(B) and setup the in-memory TLBregister 500 corresponding to the resized in-memory TLB 324(0)-324(I) toallow the resized in-memory TLB 324(0)-324(I) to be used by MMU circuit302 for VA-to-PA translations. A malicious guest may also be able toforge in-memory TLB entries 326(0)(0)-324(I)(B) in an in-memory TLBs324(0)-324(I). Under special circumstances when a host hypervisor needsthe guest process to walk a full page table, the host hypervisor coulddisable the use of in-memory TLBs 324(0)-324(I) corresponding to theguest process. During later normal operation, the in-memory TLBs324(0)-324(I) can be re-enabled. If the forgery is done under normaloperation of the guest host, it can only affect the guest process andnot other guest processes or the host process.

FIG. 9 is a block diagram of an exemplary processor-based system 900that includes a processor 902 that can include a memory managementsystem 904 with dedicated mTLBs 906 for augmenting an MM UTLB fortranslating VAs to PA, including but not limited to the memorymanagement system 300 in FIG. 3 and its exemplary components in FIGS.4A-5B, and 7A-8. The processor-based system 900 may be a circuit orcircuits included in an electronic board card, such as a printed circuitboard (PCB), a server, a personal computer, a desktop computer, a laptopcomputer, a personal digital assistant (PDA), a computing pad, a mobiledevice, or any other device, and may represent, for example, a server,or a user's computer. In this example, the processor-based system 900includes the processor 902. The processor 902 represents one or moregeneral-purpose processing circuits, such as a microprocessor, centralprocessing unit, or the like. More particularly, the processor 902 maybe an EDGE instruction set microprocessor, or other processorimplementing an instruction set that supports explicit consumer namingfor communicating produced values resulting from execution of producerinstructions. The processor 902 is configured to execute processinglogic in instructions for performing the operations and steps discussedherein. In this example, the processor 902 includes an instruction cache908 for temporary, fast access memory storage of instructions accessibleby the memory management system 904. Fetched or prefetched instructionsfrom a memory, such as from a system memory 910 over a system bus 912,are stored in the instruction cache 908. The memory management system904 is configured to process instructions fetched into the instructioncache 908 and process the instructions for execution.

The processor 902 and the system memory 910 are coupled to the systembus 912 and can intercouple peripheral devices included in theprocessor-based system 900. As is well known, the processor 902communicates with these other devices by exchanging address, control,and data information over the system bus 912. For example, the processor902 can communicate bus transaction requests to a memory controller 914in the system memory 910 as an example of a slave device. Although notillustrated in FIG. 9, multiple system buses 912 could be provided,wherein each system bus constitutes a different fabric. In this example,the memory controller 914 is configured to provide memory accessrequests to a memory array 916 in the system memory 910. The memoryarray 916 is comprised of an array of storage bit cells for storingdata. The system memory 910 may be a read-only memory (ROM), flashmemory, dynamic random access memory (DRAM), such as synchronous DRAM(SDRAM), etc., and a static memory (e.g., flash memory, static randomaccess memory (SRAM), etc.), as non-limiting examples.

Other devices can be connected to the system bus 912. As illustrated inFIG. 9, these devices can include the system memory 910, an externalcache memory 917 as part of a cache memory system 918 that may includelower-level cache memories all of which are accessible by the processor902, one or more input device(s) 918, one or more output device(s) 920,a modem 922, and one or more display controllers 924, as examples. Theinput device(s) 918 can include any type of input device, including butnot limited to input keys, switches, voice processors, etc. The outputdevice(s) 920 can include any type of output device, including but notlimited to audio, video, other visual indicators, etc. The modem 922 canbe any device configured to allow exchange of data to and from a network926. The network 926 can be any type of network, including but notlimited to a wired or wireless network, a private or public network, alocal area network (LAN), a wireless local area network (WLAN), a widearea network (WAN), a BLUETOOTH™ network, and the Internet. The modem922 can be configured to support any type of communications protocoldesired. The processor 902 may also be configured to access the displaycontroller(s) 924 over the system bus 912 to control information sent toone or more displays 928. The display(s) 928 can include any type ofdisplay, including but not limited to a cathode ray tube (CRT), a liquidcrystal display (LCD), a plasma display, etc.

The processor-based system 900 in FIG. 9 may include a set ofinstructions 930 to be executed by the processor 902 for any applicationdesired according to the instructions. The instructions 930 may bestored in the system memory 910, processor 902, and/or instruction cache908 as examples of a non-transitory computer-readable medium 932. Theinstructions 930 may also reside, completely or at least partially,within the system memory 910 and/or within the processor 902 duringtheir execution. The instructions 930 may further be transmitted orreceived over the network 926 via the modem 922, such that the network926 includes the computer-readable medium 932.

While the computer-readable medium 932 is shown in an exemplaryembodiment to be a single medium, the term “computer-readable medium”should be taken to include a single medium or multiple media (e.g., acentralized or distributed database, and/or associated caches andservers) that stores the one or more sets of instructions. The term“computer-readable medium” shall also be taken to include any mediumthat is capable of storing, encoding, or carrying a set of instructionsfor execution by the processing device and that causes the processingdevice to perform any one or more of the methodologies of theembodiments disclosed herein. The term “computer-readable medium” shallaccordingly be taken to include, but not be limited to, solid-statememories, optical medium, and magnetic medium.

The embodiments disclosed herein include various steps. The steps of theembodiments disclosed herein may be formed by hardware components or maybe embodied in machine-executable instructions, which may be used tocause a general-purpose or special-purpose processor programmed with theinstructions to perform the steps. Alternatively, the steps may beperformed by a combination of hardware and software.

The embodiments disclosed herein may be provided as a computer programproduct, or software, that may include a machine-readable medium (orcomputer-readable medium) having stored thereon instructions, which maybe used to program a computer system (or other electronic devices) toperform a process according to the embodiments disclosed herein. Amachine-readable medium includes any mechanism for storing ortransmitting information in a form readable by a machine (e.g., acomputer). For example, a machine-readable medium includes: amachine-readable storage medium (e.g., ROM, random access memory(“RAM”), a magnetic disk storage medium, an optical storage medium,flash memory devices, etc.); and the like.

Unless specifically stated otherwise and as apparent from the previousdiscussion, it is appreciated that throughout the description,discussions utilizing terms such as “processing,” “computing,”“determining,” “displaying,” or the like, refer to the action andprocesses of a computer system, or similar electronic computing device,that manipulates and transforms data and memories represented asphysical (electronic) quantities within the computer system's registersinto other data similarly represented as physical quantities within thecomputer system memories or registers or other such information storage,transmission, or display devices.

The algorithms and displays presented herein are not inherently relatedto any particular computer or other apparatus. Various systems may beused with programs in accordance with the teachings herein, or it mayprove convenient to construct more specialized apparatuses to performthe required method steps. The required structure for a variety of thesesystems will appear from the description above. In addition, theembodiments described herein are not described with reference to anyparticular programming language. It will be appreciated that a varietyof programming languages may be used to implement the teachings of theembodiments as described herein.

Those of skill in the art will further appreciate that the variousillustrative logical blocks, modules, circuits, and algorithms describedin connection with the embodiments disclosed herein may be implementedas electronic hardware, instructions stored in memory or in anothercomputer-readable medium and executed by a processor or other processingdevice, or combinations of both. The components of the distributedantenna systems described herein may be employed in any circuit,hardware component, integrated circuit (IC), or IC chip, as examples.Memory disclosed herein may be any type and size of memory and may beconfigured to store any type of information desired. To clearlyillustrate this interchangeability, various illustrative components,blocks, modules, circuits, and steps have been described above generallyin terms of their functionality. How such functionality is implementeddepends on the particular application, design choices, and/or designconstraints imposed on the overall system. Skilled artisans mayimplement the described functionality in varying ways for eachparticular application, but such implementation decisions should not beinterpreted as causing a departure from the scope of the presentembodiments.

The various illustrative logical blocks, modules, and circuits describedin connection with the embodiments disclosed herein may be implementedor performed with a processor, a Digital Signal Processor (DSP), anApplication Specific Integrated Circuit (ASIC), a Field ProgrammableGate Array (FPGA), or other programmable logic device, a discrete gateor transistor logic, discrete hardware components, or any combinationthereof designed to perform the functions described herein. Furthermore,a controller may be a processor. A processor may be a microprocessor,but in the alternative, the processor may be any conventional processor,controller, microcontroller, or state machine. A processor may also beimplemented as a combination of computing devices (e.g., a combinationof a DSP and a microprocessor, a plurality of microprocessors, one ormore microprocessors in conjunction with a DSP core, or any other suchconfiguration).

The embodiments disclosed herein may be embodied in hardware and ininstructions that are stored in hardware, and may reside, for example,in RAM, flash memory, ROM, Electrically Programmable ROM (EPROM),Electrically Erasable Programmable ROM (EEPROM), registers, a hard disk,a removable disk, a CD-ROM, or any other form of computer-readablemedium known in the art. An exemplary storage medium is coupled to theprocessor such that the processor can read information from, and writeinformation to, the storage medium. In the alternative, the storagemedium may be integral to the processor. The processor and the storagemedium may reside in an ASIC. The ASIC may reside in a remote station.In the alternative, the processor and the storage medium may reside asdiscrete components in a remote station, base station, or server.

It is also noted that the operational steps described in any of theexemplary embodiments herein are described to provide examples anddiscussion. The operations described may be performed in numerousdifferent sequences other than the illustrated sequences. Furthermore,operations described in a single operational step may actually beperformed in a number of different steps. Additionally, one or moreoperational steps discussed in the exemplary embodiments may becombined. Those of skill in the art will also understand thatinformation and signals may be represented using any of a variety oftechnologies and techniques. For example, data, instructions, commands,information, signals, bits, symbols, and chips, that may be referencesthroughout the above description, may be represented by voltages,currents, electromagnetic waves, magnetic fields, or particles, opticalfields or particles, or any combination thereof.

Unless otherwise expressly stated, it is in no way intended that anymethod set forth herein be construed as requiring that its steps beperformed in a specific order. Accordingly, where a method claim doesnot actually recite an order to be followed by its steps, or it is nototherwise specifically stated in the claims or descriptions that thesteps are to be limited to a specific order, it is in no way intendedthat any particular order be inferred.

It will be apparent to those skilled in the art that variousmodifications and variations can be made without departing from thespirit or scope of the invention. Since modifications, combinations,sub-combinations and variations of the disclosed embodimentsincorporating the spirit and substance of the invention may occur topersons skilled in the art, the invention should be construed to includeeverything within the scope of the appended claims and theirequivalents.

What is claimed is:
 1. A memory management system in a centralprocessing unit (CPU) in a processor of a processor-based system,comprising: a page table in a system memory of the processor-basedsystem, the page table comprising at least one level page table eachcomprising a plurality of page table entries each addressable by avirtual address (VA) and configured to store a physical address (PA)associated with the VA; a memory management unit (MMU) translationlookaside buffer (TLB) comprising a plurality of MMU TLB entries eachconfigured to store a cached page table entry in the page table; anin-memory TLB in the system memory, the in-memory TLB comprising aplurality of in-memory TLB entries each configured to store a cachedpage table entry in the page table; a page table walker circuitconfigured to access the plurality of page table entries in the at leastone level page table in the page table based on the VA; and an MMUcircuit configured to: receive a memory access request comprising a VAbased on a computer software instruction executed for a process in theCPU; determine if an MMU TLB entry in the MMU TLB contains a page tableentry comprising a PA corresponding to the VA; and in response todetermining the MMU TLB does not contain an MMU TLB entry containing apage table entry directly corresponding to the VA: determine if a VAstored in an in-memory TLB entry corresponding to the VA in an in-memoryTLB allocated to the process in the system memory in the processor-basedsystem matches the VA of the memory access request; and in response todetermining the VA stored in the in-memory TLB entry matches the VA ofthe memory access request, translate the VA to a PA based the accessedpage table entry in the in-memory TLB entry corresponding to the VA. 2.The memory management system of claim 1, wherein the MMU circuit isfurther configured to, in response to determining the VA stored in thein-memory TLB entry matches the VA of the memory access request: writethe page table entry in the in-memory TLB entry to an MMU TLB entrycorresponding to the VA in the MMU TLB.
 3. The memory management systemof claim 2, wherein the MMU circuit is further configured to, inresponse to determining the VA stored in the in-memory TLB entry matchesthe VA of the memory access request: write the page table entry in thein-memory TLB entry to the MMU TLB entry corresponding to the VA.
 4. Thememory management system of claim 1, wherein the MMU circuit is furtherconfigured to, in response to determining the MMU TLB contains an MMUTLB entry containing the page table entry corresponding to the VA:translate the VA to the PA contained in the MMU TLB entry correspondingto the VA.
 5. The memory management system of claim 4, wherein the MMUcircuit is configured to, in response to determining the MMU TLBcontains the MMU TLB entry containing a leaf page table entrycorresponding to the VA: translate the VA to the PA contained in the MMUTLB entry corresponding to the VA.
 6. The memory management system ofclaim 4, wherein: the page table comprises a plurality of level pagetables each comprising a plurality of page table entries eachaddressable by a different level of a VA; and the MMU circuit isconfigured to, in response to determining the MMU TLB contains the MMUTLB entry containing a non-leaf page table entry corresponding to theVA: cause the page table walker circuit to: access a page table entry ina next level page table among the plurality of level page tables in thepage table based on the non-leaf page table entry in the MMU TLB; andtranslate the VA to the PA contained in the page table entry in the nextlevel page table.
 7. The memory management system of claim 1, whereinthe MMU circuit is further configured to, in response to determining theVA stored in the accessed in-memory TLB allocated to the process doesnot match the VA of the memory access request: cause the page tablewalker circuit to: access the at least one level page table in the pagetable corresponding to the VA of the memory access request; andtranslate the VA to the PA contained in a page table entry in the atleast one level page table corresponding to the VA.
 8. The memorymanagement system of claim 7, wherein the MMU circuit is furtherconfigured to, in response to writing the page table entry in the atleast one level page table in the page table circuit corresponding tothe VA of the memory access request to an in-memory TLB entrycorresponding to the VA in the in-memory TLB: write the page table entryin the at least one level page table in the page table corresponding tothe VA of the memory access request to an MMU TLB entry corresponding tothe VA in the MMU TLB.
 9. The memory management system of claim 7wherein the MMU circuit is further configured to, in response todetermining the VA stored in the accessed in-memory TLB allocated to theprocess does not match the VA of the memory access request: write thepage table entry in the at least one level page table in the page tablecorresponding to the VA of the memory access request to an in-memory TLBentry corresponding to the VA in the in-memory TLB.
 10. The memorymanagement system of claim 7, wherein: the page table comprises aplurality of level page tables each comprising a plurality of page tableentries each addressable by a different level index of a VA; the MMUcircuit is configured to write the page table entry in at least one ofthe plurality of level page tables in the page table corresponding tothe VA of the memory access request to an MMU TLB entry corresponding tothe VA in the MMU TLB; and the MMU circuit is further configured to, inresponse to writing the page table entry in at least one level pagetable of the plurality of level page tables corresponding to the VA ofthe memory access request to the MMU TLB entry corresponding to the VAin the MMU TLB: in response to the page table entry in the at least onelevel page table of the plurality of level page tables corresponding tothe VA of the memory access request being in a highest level page tableof the plurality of level page tables: not writing the page table entryin the highest level page table corresponding to the VA of the memoryaccess request to an in-memory TLB entry corresponding to the VA in thein-memory TLB.
 11. The memory management system of claim 1, wherein:each in-memory TLB entry in the in-memory TLB further comprises a lockindicator field configured to store a lock indicator indicating a lockstate; the MMU circuit is further configured to, in response todetermining the TLB MMU does not contain an MMU TLB entry containing apage table entry corresponding to the VA: determine if a lock indicatorin the lock field in the in-memory TLB entry corresponding to the VA inthe in-memory TLB allocated to the process matches the VA of the memoryaccess request; and in response to the lock indicator indicating alocked state for the in-memory TLB entry corresponding to the VA, nottranslating the VA to a PA based the accessed page table entry in thein-memory TLB entry.
 12. The memory management system of claim 11,wherein the MMU circuit is further configured to: in response to thelock indicator indicating an unlocked state for the in-memory TLB entrycorresponding to the VA, not translating the VA to a PA based theaccessed page table entry in the in-memory TLB entry: set the lockindicator to the locked state for the in-memory TLB entry correspondingto the VA; determine if the VA stored in an in-memory TLB entrycorresponding to the VA in the in-memory TLB allocated to the processmatches the VA of the memory access request; and in response todetermining the VA stored in the in-memory TLB entry matches the VA ofthe memory access request: translate the VA to a PA based the accessedpage table entry in the in-memory TLB entry corresponding to the VA; andset the lock indicator to the unlocked state in the in-memory TLB entrycorresponding to the VA.
 13. The memory management system of claim 1,wherein the MMU circuit is further configured to: receive aninvalidation indicator for the process; and in response to receiving theinvalidation indicator for the process, flush an in-memory TLB entry inthe in-memory TLB allocated to the process in response to the in-memoryTLB entry containing a page table entry.
 14. The memory managementsystem of claim 1 wherein: each in-memory TLB entry in the in-memory TLBfurther comprises a generation number field configured to store ageneration number; and the MMU circuit is configured to, in response todetermining the VA stored in the accessed page table entry in thein-memory TLB allocated to the process does not match the VA of thememory access request: write the page table entry and a currentgeneration number in the at least one page level table in the page tablecorresponding to the VA of the memory access request to an in-memory TLBentry corresponding to the VA in the in-memory TLB.
 15. The memorymanagement system of claim 14, wherein the MMU circuit is furtherconfigured to, in response to determining the MMU TLB not containing theMMU TLB entry contains the page table entry corresponding to the VA:determine if a generation number stored in the generation number fieldin the in-memory TLB entry in the in-memory TLB allocated to the processmatches the current generation number; and in response to determiningthe generation number stored in the generation number field in thein-memory TLB entry in the in-memory TLB does not match the currentgeneration number, translate the VA to a PA based the accessed pagetable entry, the MMU circuit is further configured to cause the pagetable walker circuit to: access the at least one level page table in thepage table corresponding to the VA of the memory access request; andtranslate the VA to the PA contained in a page table entry in the atleast one level page table corresponding to the VA.
 16. The memorymanagement system of claim 1, further comprising: the in-memory TLB; andwherein: the page table comprises: a leaf level page table comprising aplurality of leaf page table entries each addressable by a leaf level ofthe VA and configured to store a PA associated with the VA; a firstlevel page table comprising a plurality of first level page tableentries each addressable by a first level of the VA and configured tostore an address of a leaf page table entry in the leaf level pagetable; and a second level page table comprising a plurality of secondlevel page table entries each addressable by a second level of the VAand configured to store an address of a first level page table entry inthe first level page table; the in-memory TLB comprises the plurality ofin-memory TLB entries each configured to store a second level page tableentry from the second level page table; and the MMU TLB comprises theplurality of MMU TLB entries each configured to store a first level pagetable entry from the first level page table.
 17. The memory managementsystem of claim 1, further comprising: the in-memory TLB; and wherein:the page table comprises: a leaf level page table comprising a pluralityof leaf page table entries each addressable by a leaf level of the VAand configured to store a PA associated with the VA; and a first levelpage table comprising a plurality of first level page table entries eachaddressable by a first level of the VA and configured to store anaddress of a leaf page table entry in the leaf level page table; and thein-memory TLB comprises the plurality of in-memory TLB entries eachconfigured to store a first level page table entry from the first levelpage table; and the MMU TLB comprises the plurality of MMU TLB entrieseach configured to store a first level page table entry from the firstlevel page table.
 18. The memory management system of claim 1, furthercomprising: the in-memory TLB; and wherein: the page table comprises: aleaf level page table comprising a plurality of leaf page table entrieseach addressable by a leaf level of the VA and configured to store a PAassociated with the VA; and a first level page table comprising aplurality of first level page table entries each addressable by a firstlevel of the VA and configured to store an address of a leaf page tableentry in the leaf level page table; and the in-memory TLB comprises: afirst in-memory TLB comprising a first plurality of in-memory TLBentries each configured to store a first level page table entry from thefirst level page table; and a second in-memory TLB comprising a secondplurality of in-memory TLB entries each configured to store a secondlevel page table entry from the second level page table.
 19. The memorymanagement system of claim 1, further comprising an in-memory TLBregister configured to store a memory address pointing to an in-memoryTLB allocated in a system memory in the processor-based system, the MMUcircuit further configured to: access the in-memory TLB entry in thein-memory TLB allocated to the process based on an in-memory TLB addresscorresponding to the process in the in-memory TLB address registercorresponding to the VA.
 20. The memory management system of claim 1comprising the system memory comprising a plurality of in-memory TLBseach allocated to a process.
 21. A method of translating a virtualaddress (VA) to a physical address (PA) in a central processing unit(CPU) in a processor of a processor-based system, comprising: receivinga memory access request comprising a VA based on a computer softwareinstruction executed for a process in the CPU; determining if a memorymanagement unit (MMU) translation lookaside buffer (TLB) entry in an MMUTLB comprising a plurality of MMU TLB entries each configured to store acached page table entry in a page table contains a page table entrycomprising a PA corresponding to the VA, wherein the page table entry iscontained in the page table comprising at least one level page tableeach comprising a plurality of page table entries each addressable by aVA and configured to store a PA associated with the VA; and in responseto determining the MMU TLB does not contain an MMU TLB entry containinga page table entry corresponding to the VA: determining if a VA storedin an in-memory TLB entry corresponding to the VA in an in-memory TLB inthe system memory of the processor-based system that is allocated to theprocess in a system memory in the processor-based system matches the VAof the memory access request; and in response to determining the VAstored in the in-memory TLB entry matches the VA of the memory accessrequest, translating the VA to a PA based the accessed page table entryin the in-memory TLB entry corresponding to the VA.
 22. The method ofclaim 21, further comprising, in response to determining the VA storedin the in-memory TLB entry matches the VA of the memory access request:writing the page table entry in the in-memory TLB entry to an MMU TLBentry corresponding to the VA in the MMU TLB.
 23. The method of claim21, further comprising, in response to determining the MMU TLB containsan MMU TLB entry containing the page table entry directly correspondingto the VA: translating the VA to the PA contained in the MMU TLB entrycorresponding to the VA.
 24. The method of claim 21, further comprising,in response to determining the VA stored in the accessed in-memory TLBallocated to the process does not match the VA of the memory accessrequest: accessing the at least one level page table in the page tablecircuit corresponding to the VA of the memory access request; andtranslating the VA to the PA contained in a page table entry in the atleast one level page table corresponding to the VA.
 25. Aprocessor-based system, comprising: a system memory; a processorcomprising one or more central processing units (CPUs) each configuredto execute computer instructions in an operating system software programand one or more processes; each CPU among the one or more CPUs comprisesa memory management system, comprising: a page table in the systemmemory, the page table comprising a plurality of level page tables eachcomprising a plurality of page table entries each addressable by avirtual address (VA) and configured to store a physical address (PA)associated with the VA; a memory management unit (MMU) translationlookaside buffer (TLB) comprising a plurality of MMU TLB entries eachconfigured to store a cached page table entry in the page table; anin-memory TLB in the system memory, the in-memory TLB comprising aplurality of in-memory TLB entries each configured to store a cachedpage table entry in the page table; a page table walker circuitconfigured to access a page table entry in at least one level page tablein the page table based on the VA; and an MMU circuit configured to:receive a memory access request comprising a VA based on a computersoftware instruction executed for a process among the one or moreprocesses in a CPU among the one or more CPUs; determine if an MMU TLBentry in the MMU TLB contains a page table entry comprising a PAcorresponding to the VA; and in response to determining the MMU TLB doesnot contain an MMU TLB entry containing a page table entry correspondingto the VA: determine if a VA stored in an in-memory TLB entrycorresponding to the VA in an in-memory TLB allocated to the process inthe system memory in the processor-based system matches the VA of thememory access request; and in response to determining the VA stored inthe in-memory TLB entry matches the VA of the memory access request,translate the VA to a PA based the accessed page table entry in thein-memory TLB entry corresponding to the VA.
 26. The processor-basedsystem of claim 25, wherein a CPU is configured to execute the operatingsystem software to: determine that a VA to PA mapping comprising one ormore VAs mapped to one or more PAs to the system memory has changed foran executed process; in response to determining that a VA-to-PA mappingto the system memory for the executed process has changed: determine ifthe page table entries in the page table corresponding to the VAs in theVA-to-PA mapping for the process are comprised of only leaf page tableentries; in response to determining the page table entries in the pagetable corresponding to the VAs in the VA-to-PA mapping for the processare not only comprised of leaf page table entries: determine if the pagetable entries in the page table corresponding to the VAs in the VA-to-PAmapping for the process are contained in the in-memory TLB entries inthe in-memory TLB corresponding to the VAs in the VA-to-PA mapping forthe executed process; and in response to determining the page tableentries in the page table corresponding to the VA-to-PA mapping for theprocess are contained in in-memory TLB entries in the in-memory TLBcorresponding to the VA for the executed process: flush the in-memoryTLB entries in the in-memory TLB corresponding to the VAs in theVA-to-PA mapping for the executed process.
 27. The processor-basedsystem of claim 26, wherein the CPU is further configured to execute theoperating system software program to, in response to determining thepage table entries in the page table corresponding to the VAs in theVA-to-PA mapping for the process are only comprised of leaf page tableentries: flush the MMU TLB entries corresponding to the VAs in theVA-to-PA mapping in the MMU TLB.
 28. The processor-based system of claim26, wherein the CPU is further configured to execute the operatingsystem software program to, in response to determining the page tableentries in the page table corresponding to the VAs in the VA-to-PAmapping for the process are not only comprised of leaf page tableentries: determine if the page table entries in the page tablecorresponding to the VAs in the VA-to-PA mapping for the process are ina level page table above a page level of the in-memory TLB; in responseto determining the page table entries in the page table corresponding tothe VAs in the VA-to-PA mapping for the process are in a level pagetable above a page level of the in-memory TLB; flush the in-memory TLBentries in the in-memory TLB corresponding to the VAs in the VA-to-PAmapping for the executed process; flush the MMU TLB entriescorresponding to the VAs in the VA-to-PA mapping in the MMU TLB; andflush the page table entries corresponding to the VAs in the VA-to-PAmapping in the page table.
 29. The processor-based system of claim 28,further comprising a plurality of in-memory TLB address registers eachcorresponding to a process to be executed in a CPU and each configuredto store a memory address pointing to an in-memory TLB allocated for aprocess in the system memory in the processor-based system; wherein: theMMU circuit in each CPU among the one or more CPUs is further configuredto access the in-memory TLB entry in the in-memory TLB allocated to theprocess based on an in-memory TLB address in an in-memory TLB addressregister of the plurality of in-memory TLB address registerscorresponding to the VA; and the CPU is further configured to, inresponse to determining the page table entries in the page tablecorresponding to the VAs in the VA-to-PA mapping for the process are ina level page table above a page level of the in-memory TLB: erase thememory address pointing to the plurality of in-memory TLB addressregisters corresponding to all processes for the CPU.
 30. Theprocessor-based system of claim 29, wherein the CPU is furtherconfigured to, in response to determining the page table entries in thepage table corresponding to the VAs in the VA-to-PA mapping for theprocess are in a level page table above a page level of the in-memoryTLB: issue a cross call command to the other CPUs among the one or moreCPUs to cause the one or more other CPUs to erase the memory addresspointing to the in-memory TLB in the plurality of in-memory TLB addressregisters corresponding to all processes for the CPU.
 31. Theprocessor-based system of claim 26, wherein: each in-memory TLB entry ineach in-memory TLB allocated for a process in the system memory furthercomprises a generation number field configured to store a generationnumber; and each MMU circuit in each CPU among the one or more CPUs isconfigured to, in response to determining the VA stored in the accessedpage table entry in the in-memory TLB allocated to the process does notmatch the VA of the memory access request: write the page table entryand a current generation number in the at least one level page table inthe page table corresponding to the VA of the memory access request toan in-memory TLB entry corresponding to the VA in the in-memory TLB; andin response to determining the VA stored in the accessed page tableentry in the in-memory TLB allocated to the process does not match theVA of the memory access request: write the page table entry and acurrent generation number in the at least one level page table in thepage table corresponding to the VA of the memory access request to anin-memory TLB entry corresponding to the VA in the in-memory TLB; and inresponse to determining the MMU TLB not containing the MMU TLB entrycontains the page table entry corresponding to the VA: determine if ageneration number stored in the generation number field in the in-memoryTLB entry in the in-memory TLB allocated to the process matches thecurrent generation number; and in response to determining the generationnumber stored in the generation number field in the in-memory TLB entryin the in-memory TLB does not match the current generation number,translate the VA to a PA based the accessed page table entry, the MMUcircuit is further configured to cause the page table walker circuit to: access the at least one level page table in the page tablecorresponding to the VA of the memory access request; and  translate theVA to the PA contained in a page table entry in the at least one levelpage table corresponding to the VA; and the CPU further configured to,in response to determining the page table entries in the page tablecorresponding to the VA-to-PA mapping for the process are contained inin-memory TLB entries in the in-memory TLB corresponding to the VA forthe executed process: change the current generation number.
 32. Theprocessor-based system of claim 26, further comprising a plurality ofin-memory TLB address registers each corresponding to a process to beexecuted in a CPU and each configured to store a memory address pointingto an in-memory TLB allocated for a process in the system memory in theprocessor-based system; wherein the CPU is further configured todynamically resize an allocation of an in-memory TLB in the systemmemory by being configured to: erase the memory address pointing to thein-memory TLB in the plurality of in-memory TLB address registerscorresponding to the in-memory TLB to be resized; and issue a cross callcommand to the other CPUs among the one or more CPUs to cause the one ormore other CPUs to erase the memory address pointing to the in-memoryTLB in the plurality of in-memory TLB address registers corresponding tothe in-memory TLB to be resized.